#!/usr/local/perl
use strict;
use warnings;

my @input_numbers = (1, 2, 4, 8, 16, 32, 64);
sub digit_sum_is_odd {
	my $input = shift;
	print "input is :[$input]\n";
	my @digits = split //, $input;  # Assume no nondigit characters
	print "digits is :[@digits]\n";
	my $sum;
	$sum += $_ for @digits;
	print "sum is :[$sum]\n";
	return $sum % 2;
}
my @odd_digit_sum = grep digit_sum_is_odd($_), @input_numbers;

print @odd_digit_sum;

